package vanjalee.bs.com.control.model;

public enum ItemType {
	PORT("Port"), CASINO("Casino"), MEDAL("Medal"), EVENT("Event"), OCHO("Ocho"), EMBER(
			"Ember"), CRAFTED("Crafted"), QUEST("Quest"), BOSS("Boss"), GOLD_LICENCE(
			"Gold licence"), SILVER_LICENCE("Silver licence"), ASSEMBLED(
			"Assembled"), REFERRAL("Referral"), PROMO("Promotion"), TOURNAMENT_PRIZE(
			"Tournament prize");

	private String value;

	ItemType(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return this.getValue();
    }

    public static ItemType getEnum(String value) {
        if(value == null)
            throw new IllegalArgumentException();
        for(ItemType v : values())
            if(value.equalsIgnoreCase(v.getValue())) return v;
        throw new IllegalArgumentException();
    }

}
